package ioperations;

import book.Book;
import book.BookList;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-05-24
 * Time: 20:47
 */
public class ShowOperation implements IOperation{
    @Override
    public void work(BookList bookList) {
        System.out.println("显示图书");

        int currentSize = bookList.getUsedSize();
        for (int i = 0; i < currentSize; i++) {
            //遍历下标，把找到的图书打印出来
            Book book = bookList.getBook(i);
            System.out.println(book);
            }
        }
    }

